#ifndef CAMERACONTROLREQUEST_H
#define CAMERACONTROLREQUEST_H

#include <QString>
#include <QUrl>

enum MoveCommand{
    // 方向控制
    CAMERA_UP = 0,
    CAMERA_DOWN,
    CAMERA_LEFT,
    CAMERA_RIGHT,
    CAMERA_LEFT_UP,
    CAMERA_RIGHT_UP,
    CAMERA_LEFT_DOWN,
    CAMERA_RIGHT_DOWN,
    // 变焦控制
    CAMERA_ZOOM_OUT,
    CAMERA_ZOOM_IN,
    // 聚焦控制
    CAMERA_FOCUS_IN,
    CAMERA_FOCUS_OUT,
    // 停止
    CAMERA_STOP
};

class CameraControlRequest
{
public:
    CameraControlRequest(const QString &url = "http://192.168.105.222/xsw/api/ptz/control");

    void setUrl(const QUrl &url);
    void setChannelId(uint32_t channelId);
    void setStep(int step);
    void setSpeed(int speed);
    QString getMoveUrl(enum MoveCommand command);

private:
    QUrl _url;
    int _speed;
    int _step;
    uint32_t _channelId;
};

#endif // CAMERACONTROLREQUEST_H
